﻿using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace ConsoleOldToNew
{
    class Program
    {
        private static readonly ILog Log = LogManager.GetLogger(typeof(Program));
        static void Main(string[] args)
        {
            try
            {
                SocketClient objSocketClient = new SocketClient();
                string str服务器IP = Properties.Settings.Default.服务器IP;
                int int服务器端口 = Properties.Settings.Default.服务器端口;
                string TranPWD = Properties.Settings.Default.通信密码;

                int int数据发送之间间隔 = Properties.Settings.Default.数据发送之间间隔;
                int int传输间隔 = Properties.Settings.Default.传输间隔;

                DTU_Send objDTU_Send = new DTU_Send(TranPWD, objSocketClient, str服务器IP, int服务器端口, int数据发送之间间隔, int传输间隔);
                Thread threadDTU_Send = new Thread(new ThreadStart(objDTU_Send.DTU_SendMonitor));
                threadDTU_Send.Start();
            }
            catch (Exception ex)
            {
                Log.Error(ex);
            }

        }
    }
}
